package org.luckyjourney.controller.RegularUsers;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.luckyjourney.service.regularusers.RegularUsersService;
import org.luckyjourney.util.BaseContext;
import org.luckyjourney.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("/luckyjourney/regular")
@Api(tags = "aaaaaaaaaaaaaaa")
@Slf4j
public class RegularUsersController {

    @Autowired
    RegularUsersService regularUsersService;


    /**
     * 获取咨询师信息
     * @param userId
     * @return
     * @throws Exception
     */
    @GetMapping("/consultants/{userId}")
    @ApiOperation("查看咨询信息")
    public R getconsultants(@PathVariable Long userId){

        return R.ok().data(regularUsersService.getconsultants(userId));
    }


    /**
     * 获取咨询师信息
     * @param userId
     * @return
     * @throws Exception
     */
    @GetMapping("{userId}")
    @ApiOperation("单次最低价格，时长，地址")
    public R getDuration(@PathVariable Long userId){

        return R.ok().data(regularUsersService.getDuration(userId));
    }

}
